package es.christiangarcia.android.pokepedia;

import java.util.List;

import android.os.Bundle;
import es.christiangarcia.android.pokepedia.dao.PokemonDAO;
import es.christiangarcia.android.pokepedia.model.vo.PokemonVO;

public class PokepediaActivity extends ActionBarListActivity {
	private PokemonDAO datasource;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		datasource = new PokemonDAO(this);

		List<PokemonVO> allPokemonVOs = datasource.getAllPokemonVOs();
		System.out.println(allPokemonVOs);

	}

	@Override
	protected void onResume() {
		datasource.openDatabase();
		super.onResume();
	}

	@Override
	protected void onPause() {
		datasource.closeDatabase();
		super.onPause();
	}

}